added Feb 2001 SDK
[windows-sources.git] / shared source / sscli20 / samples / pigui / tk / tknative.cs
blob629e8abc62a95c63c4b84a733a0e6e386d0ffffb
1 //------------------------------------------------------------------------------
2 // <copyright file="TkNative.cs" company="Microsoft">
3 //
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
5 //
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
10 //
11 // You must not remove this notice, or any other, from this software.
12 //
13 // </copyright>
14 //------------------------------------------------------------------------------
16 using System;
17 using System.Runtime.InteropServices;
19 namespace SharedSourceCLI.TK
21 internal unsafe class TkNative {
23 #if !PLATFORM_UNIX
24 internal const String DLLPREFIX = "";
25 internal const String DLLSUFFIX = ".dll";
26 internal const String DLLNAME = "tk84";
27 #else // !PLATFORM_UNIX
28 internal const String DLLPREFIX = "lib";
29 internal const String DLLNAME = "tk8.4";
30 #if __APPLE__
31 internal const String DLLSUFFIX = ".dylib";
32 #else
33 internal const String DLLSUFFIX = ".so";
34 #endif
35 #endif // !PLATFORM_UNIX
37 internal const String TK_LIB = DLLPREFIX + DLLNAME + DLLSUFFIX;
39 [DllImport(TK_LIB, EntryPoint="Tk_Init", CallingConvention=CallingConvention.Cdecl)]
40 internal static extern int Tk_Init(Tcl_Interp* interp);
42 [DllImport(TK_LIB, EntryPoint="Tk_MainEx", CallingConvention=CallingConvention.Cdecl)]
43 internal static extern void Tk_MainEx(int argc, [In, MarshalAs(UnmanagedType.LPArray)] string[] argv,
44 Tcl_AppInitProc appInitProc, Tcl_Interp* interp);